<?php	

	include("../inc/joomlaInt_admin.php");
	include("../inc/inc_configuration.php");
	include("../inc/inc_delete.php");

if ($jUser==0)
{
	echo "Bitte zuerst einloggen!";
}
else
{
	
	$q="SELECT gid FROM $tbl_users WHERE id=$jUser";
					$qe=mysql_query($q);
					$qeo=mysql_fetch_object($qe);
					
					$gid=$qeo->gid;
					
					if ($gid!=$admingroup)
					{
						echo "Du bist kein Admin!";
						break;
					}
					
	$match=$_GET["matchId"];
	$ref=$_GET["ref"];
	
	//GET matchday
	$q = "SELECT matchday,leagueId,stageId FROM $tbl_matches WHERE id=$match";
	$qe = mysql_query($q);
	$qeo = mysql_fetch_object($qe);
	
	$matchday = $qeo->matchday;
	$liga = $qeo->leagueId;
	$gruppe = $qeo->stageId;
	
	$del=spiel_entfernen($match);
	
	if ($ref!=1)
	{
		$t="ligaspiele.php?liga=$liga&matchday=$matchday";
	}
	else
	{
		$t="gruppenspiele.php?gruppe=$gruppe&matchday=$matchday";
	}

	echo 'Sie werden weitergeleitet... <meta http-equiv="refresh" content="0; URL=',$t,'">   ';
	
}

?>